package com.hdoit.kylin.web.studentManager.modelconfig;

import com.tennetcn.component.attribute.DateTimeAttribute;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author      anshengqiang
 * @email       
 * @createtime  2017年08月01日 19:44:19
 * @comment
 */
public class WritePaperConfig extends ModelMetadataAttributeConfiguration{
    public WritePaperConfig(){
        this.setProperty("paperName")
            .hasAttribute(new DisplayNameAttribute("论文题目"))
            .hasAttribute(new RequiredAttribute("论文题目为必填项"));

        this.setProperty("paperVersion")
            .hasAttribute(new DisplayNameAttribute("论文版本"));

        this.setProperty("paperAuthor")
            .hasAttribute(new DisplayNameAttribute("论文作者"))
            .hasAttribute(new RequiredAttribute("论文作者为必填项"));

        this.setProperty("paperAddress")
            .hasAttribute(new DisplayNameAttribute("论文地址"));

        this.setProperty("paperDate")
            .hasAttribute(new DisplayNameAttribute("创建日期"))
            .hasAttribute(new RequiredAttribute("创建日期为必填项"))
            .hasAttribute(new DateTimeAttribute());

        this.setProperty("paperMark")
            .hasAttribute(new DisplayNameAttribute("论文标记"))
            .hasAttribute(new RequiredAttribute("论文标记为必填项"));

    }
}